package com.java_foundation.huawei.Test_11;

import java.util.Scanner;

/**
 * @program: java_foundation
 * @description: 计算字符串最后一个单词的长度，单词以空格隔开。
 * @author: xiongbangwen <Email>xiongbangwen@163.com</Email>
 * @create: 2020-08-03 00:04
 **/
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        String[] strArr = str.split(" ");
        int len = strArr.length-1;
        String lastStr = strArr[len];
        System.out.println(lastStr.length());
    }
}
